home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / unix / bootlin4 / bootlin.doc < prev    next >
Encoding:
Text File  |  1992-06-30  |  5.5 KB  |  121 lines

  1.  
  2. SUBJECT: BootLinux v1.3 documentation
  3.  
  4. DATE:    06-30-92
  5. AUTHOR: Fabien COUTANT
  6.     ENSIMAG, Grenoble, France
  7. Email:    coutant@imag.imag.fr (until 06-30-92)
  8.  
  9. COMMAND:    bootlin.com
  10. SYNTAX:        [<path>]bootlin <file>
  11.     <path>    is the DOS path where BOOTLIN.COM is located
  12.     <file>    is the full name of the Linux boot image
  13.         (relatively to your boot drive root)
  14.  
  15. DESCRIPTION:
  16.     The image file, which name is provided on the command line, is
  17. the one you "rawrite" to a disk to make it boot Linux: it must contain
  18. the decompressed form of the bootimage-xxxx.Z; you can also copy (with
  19. mtools I suppose) the file "Image", that is produced by making the kernel,
  20. to a DOS partition and then use it directly as argument in the bootlin
  21. command line.
  22.     BootLinux loads from the specified file the three components
  23. (boot sector, setup and kernel) at their usual loading addresses, then
  24. correctly sets some registers and jumps to the setup, which in his turn
  25. should run Linux.
  26.     Since the kernel is loaded from the first 64K barrier (10000H or
  27. 1000H:0) and bootlin uses DOS to read the file, and because DOS will
  28. load bootlin at the lowest address above itself, bootlin MUST be loaded
  29. below the first 64K of the memory. The best way to achieve that is to
  30. declare your CONFIG.SYS as the unique line:
  31.  
  32.     SHELL=c:\etc\bootlin.com c:\etc\bootimag.96b
  33.  
  34. assuming that the bootlin.com and bootimag.96b files are in c:\etc.
  35. Of course, you still want to be able to run DOS at the same time, so
  36. the idea is to use a CONFIG.SYS "multiplexer", e.g. something that
  37. shows you on boot a menu, in which you choose wether you want to boot
  38. DOS or Linux. I personnally use BOOT.SYS, which consumes nearly no
  39. memory and is very powerful; using this, a config.sys should look like:
  40.  
  41.     DEVICE=C:\UTIL\BOOT.SYS
  42.     DEVICE=BOOT.1 DOS
  43.       ...
  44.       here you put the usual config.sys
  45.       ...
  46.  
  47.     DEVICE=BOOT.2 Linux
  48.       SHELL=c:\etc\bootlin c:\etc\image
  49.  
  50.     DEVICE=BOOT.END
  51.  
  52.     If you are using DOS 5, it may tell you that it is trying to
  53. load BootLin high and that it fails... don't worry: apart from the
  54. message, it doesn't matter. BTW, I used to put a "DOS=LOW" line to
  55. remove the warning message, but then DOS was ALWAYS loading low, even
  56. if I had a "DOS=HIGH" in the first part of the config.sys ... It appears
  57. that to know if it has to load high or low, DOS reads entirely the
  58. config.sys and looks for the last "DOS=".
  59.     If the specified file is not found, you will be prompted to enter
  60. a new file name, until the corresponding file is found. If an error occur during
  61. loading, a small error message is displayed and the computer is hung. The
  62. behaviour is not defined if you don't follow exactly the syntax... in the
  63. best case it will prompt you for a new file name.
  64.     BootLinux checks if it is loaded enough low in memory; if it is not
  65. the case, an error message is displayed, the computer is hung, and you
  66. should reboot. It also checks the file is a copy of a BIOS bootable disk.
  67.     Once all the loading is done, BootLinux now checks for a non-zero
  68. root device number, so if there's nothing to use as root indicated in the
  69. boot sector, it prompts you for a root device. The available devices are:
  70.         [1] at0        is    5'1/4 1.2M disk in A:
  71.         [2] ps0        is    3'1/2 1.44M disk in A:
  72.         [3] at1        is    5'1/4 1.2M disk in B:
  73.         [4] ps1        is    3'1/2 1.44M disk in B:
  74.         [A] hda1    is    Hard Drive 0 BIOS Partition 1
  75.         [B] hda2    is    Hard Drive 0 BIOS Partition 2
  76.         [C] hda3    is    Hard Drive 0 BIOS Partition 3
  77.         [D] hda4    is    Hard Drive 0 BIOS Partition 4
  78.         [E] hdb1    is    Hard Drive 1 BIOS Partition 1
  79.         [F] hdb2    is    Hard Drive 1 BIOS Partition 2
  80.         [G] hdb3    is    Hard Drive 1 BIOS Partition 3
  81.         [H] hdb4    is    Hard Drive 1 BIOS Partition 4
  82.  
  83.     NOTE! the behaviour of BootLinux is NOT defined if the kernel is
  84. more than 512K in size... or if you have less than 640K base memory (I have
  85. not any machine of this kind to test).
  86.  
  87.  
  88. DETAILS: (There a lot more checking that is done, but not described here.
  89.         The following description is no more exactly valid because
  90.         bootlin is not finished at the moment. See the source)
  91.     This section describes the details of the loading procedure:
  92.     1) installs a new little 2K stack above the program, and checks
  93.        this doesn't overlap with the loading zone of the kernel (10000H).
  94.     2) tries to open the specified file
  95.     3) reads 512 bytes at 9000h:0 (the boot sector)
  96.     4) reads 4*512 bytes at 9000h:200h (the setup)
  97.     5) loads the remaining bytes of the file at 1000h:0
  98.        and closes the file
  99.     6) sets SS=DS=ES=9000h, SP=4000h and AX=<ROOTDEV> found in the
  100.         bootsector.  SP was before set to the v0.12 value... OK, I
  101.         admit it is more secure to set it to the new v0.95c+ & Co value,
  102.         BUT I checked that it had nothing to do with the problems you
  103.         had with the first version.
  104.         I would have liked to also set FS and GS, but this caused
  105.         problems at linking with TLINK, so I gave it up.
  106.         I set SP to 4000h, not 3FF4h, because there's no need for a new
  107.         disk parameter table, since linux does not use Bios to read the
  108.         root device.
  109.     7) jumps at 9020h:0. That's here I made an enormous mistake last time:
  110.          jumping at 9000h:200h caused possible hangs of the computer and
  111.          display of garbage instead of the "Press <RETURN> to see...".
  112.          I'm now surprised it worked well, apart from the garbage problem.
  113.  
  114. INFORMATIONS:
  115.     For those who want to use BOOT.SYS, it is shareware and can be
  116.     found at least on Simtel mirrors. I know more particularly the
  117.     following locations:
  118.         wuarchive.wustl.edu:/systems/msdos/[sS]imtel20/sysutl/boot142.zip
  119.         oak.oakland.edu:/pub/msdos/sysutl/boot142.zip
  120.  
  121.